class Boom {
  constructor(ctx, enemy) {
    this.ctx = ctx
    this.enemy = enemy
    this.init = {
      x: enemy.init.x,
      y: enemy.init.y,
      w: 96,
      h: 72
    }
    this.index = 0
    this.status = true
  }
  draw(animations, music) {
    this.index += 1
    if(this.index > 18){
      this.index = 18
      this.status = false
    }
    let img = animations[this.index]
    this.ctx.drawImage(img, this.init.x, this.init.y, this.init.w, this.init.h)
  }
}

export default Boom
